package com.oa.configuration;

import jk.framework.spring.security.SecuritySupport;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * spring-security 支持类
 * @author cuichao
 */
@Configuration
public class SecuritySupportConfiguration {

    @Bean("securitySupport")
    public SecuritySupport securitySupport(){
        return new SecuritySupport();
    }

    @Bean("passwordEncoder")
    public PasswordEncoder passwordEncoder(){
        return new BCryptPasswordEncoder();
    }

}
